abstract class Woker {
  constructor(public name: string) {}
  abstract work(): void;
  say(): void {
    console.log(this.name);
  }
}

class WebWoker extends Woker {
  constructor(name: string) {
    super(name);
  }

  work(): void {
    console.log(this.name + '正在工作');
  }
  say(): void {
    console.log('Hello');
  }
}

// let woker1: Woker = new Woker('woker1'); // 不能创建抽象类的实例
let webWoker = new WebWoker('woker');
webWoker.work();
webWoker.say();